 /**
 * @(#) StartupCommand.as
 *
 * @date		2009. 02. 25.
 * @version		1.0
 * @author		Shin, Yunwoo
 * @description	Application 시작을 처리하는 Command
 *
 */
package com.skt.common_hr.fudraw.controller
{


	import com.skt.common_hr.fudraw.model.AttachFileProxy;
	import com.skt.common_hr.fudraw.model.FudrawWriteProxy;
	import com.skt.common_hr.fudraw.model.NoticeViewProxy;
	import com.skt.common_hr.fudraw.model.NoticeWriteProxy;
	import com.skt.common_hr.fudraw.view.FudrawWriteMediator;
	import com.skt.common_hr.fudraw.view.NoticeOverViewMediator;
	import com.skt.common_hr.fudraw.view.NoticeWriteMediator;
	
	import org.puremvc.as3.multicore.interfaces.ICommand;
	import org.puremvc.as3.multicore.interfaces.INotification;
	import org.puremvc.as3.multicore.patterns.command.SimpleCommand;

	public class StartupCommand extends SimpleCommand implements ICommand
	{

		override public function execute(note:INotification):void
		{
			var app:Fudraw = note.getBody() as Fudraw;
			trace("execute startupCommand in Formcon Module");

			facade.registerProxy(new NoticeViewProxy());
			facade.registerProxy(new NoticeWriteProxy());
			
			facade.registerProxy(new FudrawWriteProxy());
			facade.registerProxy(new AttachFileProxy());

			// MVC 모델중 View와 관련한 mediator들을 등록한다.
			facade.registerMediator(new NoticeOverViewMediator(app.view));
			facade.registerMediator(new NoticeWriteMediator(app.view.noticeWrite));
			
			facade.registerMediator(new FudrawWriteMediator(app.view.fudrawWrite));
		}
	}
}